﻿<!--
// ================================================================================
// The contents of this file are subject to the Mozilla Public License
// Version 2.0 (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/2.0/
//
// Software distributed under the License is distributed on an "AS IS"
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
// License for the specific language governing rights and limitations
// under the License.
// ================================================================================
-->
<Page x:Class="Reflex.Os.Aion.View.ChatView"
	x:ClassModifier="internal"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:cv="clr-namespace:Reflex.Framework.Converter;assembly=Reflex.Framework"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<!-- Region:Resources -->
	<Page.Resources>
		<cv:CommandConverter x:Key="CommandConverter" />
	</Page.Resources>
	<!-- EndRegion:Resources -->
	<!-- Region:Page -->
	<Grid Background="Gray" Width="330">
		<!-- Region:Page:ColumnDefinitions -->
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="*" />
			<ColumnDefinition Width="auto" />
		</Grid.ColumnDefinitions>
		<!-- EndRegion:Page:ColumnDefinitions -->
		<!-- Region:Page:RowDefinitions -->
		<Grid.RowDefinitions>
			<RowDefinition Height="*" />
			<RowDefinition Height="auto" />
		</Grid.RowDefinitions>
		<!-- EndRegion:Page:RowDefinitions -->
		<!-- Region:Page:ScrollViewer -->
		<ScrollViewer Background="#333333" Grid.ColumnSpan="2" Height="200" Margin="8" Name="ScrollViewer" Width="310">
			<!-- Region:Page:ScrollViewer:ItemsControl -->
			<ItemsControl Name="ItemsControl">
				<!-- Region:Page:ScrollViewer:ItemsControl:ItemsPanel -->
				<ItemsControl.ItemsPanel>
					<ItemsPanelTemplate>
						<StackPanel Margin="4" Orientation="Vertical" />
					</ItemsPanelTemplate>
				</ItemsControl.ItemsPanel>
				<!-- EndRegion:Page:ScrollViewer:ItemsControl:ItemsPanel -->
				<!-- Region:Page:ScrollViewer:ItemsControl:ItemTemplate -->
				<ItemsControl.ItemTemplate>
					<DataTemplate>
						<TextBlock Foreground="White" Name="TextBlock" TextWrapping="WrapWithOverflow">
							<TextBlock.Text>
								<Binding Path="." />
							</TextBlock.Text>
						</TextBlock>
					</DataTemplate>
				</ItemsControl.ItemTemplate>
				<!-- EndRegion:Page:ScrollViewer:ItemsControl:ItemTemplate -->
				<!-- Region:Page:ScrollViewer:ItemsControl:ItemsSource -->
				<ItemsControl.ItemsSource>
					<Binding Path="Message" />
				</ItemsControl.ItemsSource>
				<!-- EndRegion:Page:ScrollViewer:ItemsControl:ItemsSource -->
			</ItemsControl>
			<!-- EndRegion:Page:ScrollViewer:ItemsControl -->
		</ScrollViewer>
		<!-- EndRegion:Page:ScrollViewer -->
		<!-- Region:Page:Queue -->
		<TextBox Grid.Row="1" Margin="8,0,8,8" MaxLength="128" Name="Queue">
			<TextBox.Text>
				<Binding Path="Queue" UpdateSourceTrigger="PropertyChanged" />
			</TextBox.Text>
		</TextBox>
		<!-- EndRegion:Page:Queue -->
		<!-- Region:Page:Send -->
		<Button Content="Send" Grid.Column="1" Grid.Row="1" Margin="0,0,8,8" Name="Send" Width="50">
			<Button.Command>
				<Binding Path="Send" Converter="{StaticResource CommandConverter}" />
			</Button.Command>
		</Button>
		<!-- EndRegion:Page:Send -->
	</Grid>
	<!-- EndRegion:Page -->
</Page>